@extends('backend.layouts.page')
@section('content')
    <form class="form-horizontal ajaxForm" action="{{url($baseRoute.'save')}}">
        <input type="hidden" name="id" value="{{$entity->id}}"/>
        <div class="form-group">
            <label class="col-xs-3 control-label required">标题</label>
            <div class="col-xs-9">
                <input type="text" name="title" value="{{$entity->title}}" placeholder="请输入名称" class="form-control"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-3 control-label required">标签</label>
            <div class="col-xs-9">
                @foreach(\App\Models\Article::FLAGS as $key=>$value)
                    <label class="lyear-checkbox checkbox-inline checkbox-primary">
                        <input type="checkbox" name="flag[]" value="{{$key}}" @if($entity->flag&(1<<($key-1))) checked  @endif><span>{{$value}}</span>
                    </label>
                @endforeach
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-9 col-xs-offset-3">
                <button class="btn btn-primary" type="submit">立即提交</button>
            </div>
        </div>
    </form>
@stop
